import request from '@/config/axios'


const uirl='/api/app/backstage';

// 创建客服
export const createKefu = async (data) => {
  return await request.post({ url:  uirl+'/kefu/back/create', data })
}



// 更新客服

export const  updateKefu = async (data) => {
  return await request.put({ url:uirl+'/kefu/back/update', data })
}



// 删除客服
export const deleteKefu = async (id) => {
  return await request.delete({ url: uirl+ '/kefu/back/delete?id=' + id })
}



// 获得客服
export const getKefu = async (id) => {
  return await request.get({ url:uirl+'/kefu/back/get?id=' + id })
}



// 获得验证二维码
export const getKefuErweima = async (id) => {
  return await request.get({ url:uirl+'/kefu/back/getKefuErweima?url=' + id })
}


// 获得客服分页
export const getKefuPage = async (params) => {
  return await request.get({ url: uirl+'/kefu/back/page', params })
}


// // 导出客服 Excel
// export function exportKefuExcel(params) {
//   return request({
//     url: '/kefu/export-excel',
//     method: 'get',
//     params,
//     responseType: 'blob'
//   })
// }